package com.classload.service.fallback;

import com.classload.domain.Product;
import com.classload.service.ProductService;
import org.springframework.stereotype.Component;

//容错类需要实现 与 feign接口一样的方法
@Component
public class ProductServiceFallBack implements ProductService {
    @Override
    public Product findByPid(Integer pid) {

        Product product = new Product();
        product.setPid(-500);
        product.setPname("查询商品失败");
        return product;
    }
}
